package linkedlist;

public class Main {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(123);
        myLinkedList.addFirst(23);
        myLinkedList.addFirst(13);
        MyLinkedList myLinkedList2 = new MyLinkedList();
        myLinkedList2.addLast(3);
        myLinkedList2.addLast(19);
        myLinkedList2.addLast(48);
        MyLinkedList.ListNode listNode =
                MyLinkedList.mergeTwoLists(myLinkedList.head,myLinkedList2.head);
        myLinkedList.print(listNode);
    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.createNode();
        myLinkedList.print();
//        System.out.println(myLinkedList.contains(13));
//        System.out.println(myLinkedList.contains(134));
//        myLinkedList.addFirst(123);
//        myLinkedList.print();
//        myLinkedList.addLast(165);
//        myLinkedList.print();
//        try {
//            myLinkedList.addIndex(10, 888);
//        } catch (LinkedListIndexOutOfException e){
//            e.printStackTrace();
//        }
//        myLinkedList.print();
        myLinkedList.removeData(19);
        myLinkedList.print();
    }
}
